<template>
	<view class="card">
		<view class="page">
			<view class="list-item" v-for="(item,index) in message" :key="index" @click="connect(item)">

				<view class="content">
					
					<view class="txt">{{ item.desc }}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	

	export default {
		data() {
			return {
				message: []
			};
			



		},
	

		onLoad() {
			this.getmessage()

		},

		// onShow() {
		// 	if (this.hasLogin) {
		// 		//this.$store.dispatch('getUserInfo');
		// 		this.mrjzr()
		// 	} else {
		// 		// this.exist = false
		// 		// return
		// 		this.toWx()
		// 	}
		// },
		methods: {
			onClick(e) {
				console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮')
			},
			swipeChange(e, index) {
				console.log('当前状态：' + e + '，下标：' + index)
			},
			connect(item) {
				uni.navigateTo({
					url: `/pages/zhuyaun/news/new/new?id=${item.id}`
				})
			},


			getmessage() {
				this.$request("help", "List", {
					rows: 20,
					page: 1,
					Code: 'Hknowledge',
					KeyWords: '',

				}).then(res => {
					if (res.code == 1) {
						console.log("doctor", res)
						this.message = res.data.rows


					} else {
						console.log("获取失败")
					}
				})
			},


		}
	}
</script>

<style>
	@import './news.css';
</style>